package com.itheima.loopingthroughstrings;

import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.util.Date;

/*
> 字符串数据："熊大,20,男,上海,2003-03-10;熊二,19,男,北京,2004-03-10;翠花,20,女,上海,2003-01-10"

> 集合： ArrayList<User> userList = new ArrayList<>();
>
> User对象属性：姓名[String]、年龄[int]、性别[char]、城市[String]、出生日期、创建时间
>
> - 创建时间，就是创建当前User对象时的当前系统日期时间
>
> 备注：和日期时间相关的数据使用JDK8中新的API对象

- 功能1：向集合中存储多个User对象
- 功能2：打印输出2000年1月1日后出生的User对象信息
 */
public class User {
    private String name;
    private int age;
    private char sex;
    private String city;
    // Date date=new Date();
    //LocalDate dates=LocalDate.of(2003,03,10);
    private LocalDate birthDay;
     private  LocalDate  time;





    public User(String name, int age, char sex, String city, LocalDate birthDay, LocalDate time) {
        this.name = name;
        this.age = age;
        this.sex = sex;
        this.city = city;
        this.birthDay = birthDay;

        this.time = time;

    }

    public User() {


    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public  LocalDate  getTime() {
        return time;
    }

    public void setTime( LocalDate  time) {
        this.time = time;
    }

    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", sex=" + sex +
                ", city='" + city + '\'' +
                ", birthDay=" + birthDay +
                ", time='" + time + '\'' +
                '}';
    }

    public void setAge(int age) {
        this.age = age;
    }

    public char getSex() {
        return sex;
    }

    public void setSex(char sex) {
        this.sex = sex;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }



    public  LocalDate getBirthDay() {
        return birthDay;
    }

    public void setBirthDay( LocalDate birthDay) {
        this.birthDay = birthDay;
    }
}
